{% extends "admin/base.html" %}


{% block extrahead %}
{% load adminmedia %}
<script type="text/javascript" src="{% admin_media_prefix %}jquery-1.2.3.js"></script>
<script type="text/javascript" src="{% admin_media_prefix %}toogle.js"></script>
<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}portlets.css" />
<!--<script type="text/javascript" src="/site_media/jquery.cookie.js"></script>-->
<script type="text/javascript" src="{% admin_media_prefix %}autocomplete.js"></script>
<script type="text/javascript" src="{% admin_media_prefix %}js/date.js"></script>
<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}jquery.autocomplete.css" />
<!-- script type="text/javascript" src="/media/js/admin/admin-expand.js"></script -->



		
		
{% block morejs %}
{% endblock %}
{% endblock %}

{% load i18n %}

{% block title %}{% trans 'Sistemas Lis' %}{% endblock %}

{% block branding %}
<h1 id="site-name"></h1>
{% endblock %}

{% block nav-global %}{% endblock %}

{% block footer %}<div id="footer"></div>
<script type="text/javascript">

function date_now() {
       var d = new Date();
       var i, month = null;
       
       for(i=0;i< d.getISODate().length; i++)
       {
       	  if(d.getISODate()[i]=='-')
	  {
	  	
	  	month = d.getISODate()[i+1]+d.getISODate()[i+2] ;
		
	  }
	  if(month != null)
	  		break;
       }
	return d.getDate() + "/" + month + "/" + d.getFullYear(); //getISODate();
}


function sacar_moneda(s) {
	var s2 = '';
	var flag=false;
	if (s=='') return 0.0;
	for(var i=0;i< s.length; i++)
	{
		if(s[i]==' ') 
			flag=true;
		else if (flag) 
			s2 += s[i];
	}
	return parseFloat(s2);
}

$(function() {
	//TODO MEJORAR ESTO
	
	//HASTA ACA
	$('a').each(
		function(intIndex) {
			$(this).attr('tabindex',-1);
		}
	);

	$('input[type=hidden]').each(
		function(intIndex) {
			$(this).attr('tabindex',-1);
		}
	);
	$('input[readonly]').each(
		function(intIndex) {
			$(this).attr('tabindex',-1);
		}
	);
	list = $(':input').not('[readonly]').not('[type=hidden]');
	list.each(
		function(intIndex) {
			$(this).attr('tabindex',intIndex);
			if (this.tagName.toLowerCase() != 'textarea') {
				$(this).keydown(function(event) {
					if ($(this).attr('type') != 'submit' && event.which == 13) {
					
						list[intIndex+1].focus();
   						return false;
//    					}else if(event.which==38){
// 						list[intIndex-1].focus();
//    						return false;
// 					}else if(event.which==40){
// 						list[intIndex+1].focus();
//    						return false;
 					}
					else{	
	   					return true;			   
					}	
				});
			}
		}
	);
		
});
	
</script>
{% endblock %}